package com.vito.test.action;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vito.base.model.Result;
import com.vito.test.QueryTest;


@Controller
public class QueryTestAction {

	@Reference
	private QueryTest queryTest;
	
	@RequestMapping("/queryTest")
	@ResponseBody
	public Result queryTest(){
		Result res = new Result();
		try {
			
			long start = System.currentTimeMillis();
			List<Map<String, Object>> queryTest2 = queryTest.queryTest();
			res.setData(queryTest2);
			long end = System.currentTimeMillis();
			
			System.out.println(queryTest2.size());
			System.out.println(end - start);
			
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return res;
	}
	
	@RequestMapping("/uploads")
	public String uploads(){
		return "dcs/alarm/uploads";
	}
	@RequestMapping("/testGPS")
	public String testGPS(){
		return "dcs/alarm/testEva2";
	}
}
